name = "helicone-worker-dev"
main = "src/index.ts"
compatibility_date = "2022-11-29"
compatibility_flags = [
	"transformstream_enable_standard_constructor",
	"streams_enable_constructors",
]
logpush = true
node_compat = true

durable_objects.bindings = [
	{ name = "RATE_LIMITER", class_name = "InMemoryRateLimiter" }
]

kv_namespaces = [
	{ binding = "RATE_LIMIT_KV", id = "0492dc9511cb4ed5b6f012a85354fa34", preview_id = "d275df550f7a4276ad50a3115f3e84b4" },
	{ binding = "CACHE_KV", id = "81f49b61645345a499b37e3944c3502d", preview_id = "9d7e936c78be456c8c7e296a15215837" },
	{ binding = "INSERT_KV", id = "364ccea321534b4397fd8934f5757bd6", preview_id = "03504e09b1c949e6a3b77b11bb45d602" },
	{ binding = "UTILITY_KV", id = "8b5d1650741d4f999e858f788387e3fa", preview_id = "a0ecbc9180784f7096e7ca1932b5676a" },
	{ binding = "SECURE_CACHE", id = "43d1ce4eaa9c4be9ae88a97ea8ed88ef", preview_id = "23d7b3cb44254e0eb0b824a310abe155" },
]

[vars]
SUPABASE_SERVICE_ROLE_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6InNlcnZpY2Vfcm9sZSIsImV4cCI6MTk4MzgxMjk5Nn0.EGIM96RAZx35lJzdJsyH-qQwv8Hdp7fsn3W0YpN81IU"
SUPABASE_URL = "http://localhost:54321"
CLICKHOUSE_HOST = "http://localhost:18123"
CLICKHOUSE_USER = "default"
CLICKHOUSE_PASSWORD = ""
PROVIDER = "OPENAI"
TOKEN_COUNT_URL = "https://tokens.helicone.ai/anthropic/count_tokens"
WORKER_TYPE = "OPENAI_PROXY"
VAULT_ENABLED = "true"
REQUEST_CACHE_KEY = "9984c295ec7d0f506b8af65e9d60773480eb0c9347a6bd8a2b08fb57b5117701"
VALHALLA_URL = "http://localhost:8585"

[triggers]
crons = ["* * * * *", "0 * * * *"]

[env.production]
name = "helicone-worker-prod"
routes = [
	{ pattern = "oai.hconeai.com", custom_domain = true, zone_name = "hconeai.com" },
	{ pattern = "anthropic.hconeai.com", custom_domain = true, zone_name = "hconeai.com" },
	{ pattern = "api.hconeai.com", custom_domain = true, zone_name = "hconeai.com" },
	{ pattern = "gateway.hconeai.com", custom_domain = true, zone_name = "hconeai.com" },
	{ pattern = "2yfv.hconeai.com", custom_domain = true, zone_name = "hconeai.com" },
]

durable_objects.bindings = [
	{ name = "RATE_LIMITER", class_name = "InMemoryRateLimiter" }
]

kv_namespaces = [
	{ binding = "RATE_LIMIT_KV", id = "0492dc9511cb4ed5b6f012a85354fa34", preview_id = "d275df550f7a4276ad50a3115f3e84b4" },
	{ binding = "CACHE_KV", id = "81f49b61645345a499b37e3944c3502d", preview_id = "9d7e936c78be456c8c7e296a15215837" },
	{ binding = "INSERT_KV", id = "364ccea321534b4397fd8934f5757bd6", preview_id = "03504e09b1c949e6a3b77b11bb45d602" },
	{ binding = "UTILITY_KV", id = "8b5d1650741d4f999e858f788387e3fa", preview_id = "a0ecbc9180784f7096e7ca1932b5676a" },
	{ binding = "REQUEST_AND_RESPONSE_QUEUE_KV", id = "cf75f1c978d14eaeabc4483662688ab4", preview_id = "cf75f1c978d14eaeabc4483662688ab4" },
	{ binding = "SECURE_CACHE", id = "43d1ce4eaa9c4be9ae88a97ea8ed88ef", preview_id = "23d7b3cb44254e0eb0b824a310abe155" },
]

[env.production.triggers]
crons = ["* * * * *", "0 * * * *"]

queues.producers = [
	{ binding = "FALLBACK_QUEUE", queue = "fallback-queue-prod" },
]

[env.production.vars]
SUPABASE_URL = "https://bolqqmqbrciybnypvklh.supabase.co"
CLICKHOUSE_HOST = "https://p76qbrlulo.us-east-1.aws.clickhouse.cloud:8443"
VAULT_ENABLED = "true"


[env.production_staging]
name = "helicone-worker-prod-staging"
routes = [
	{ pattern = "oai_staging.hconeai.com", custom_domain = true, zone_name = "hconeai.com" },
	{ pattern = "anthropic_staging.hconeai.com", custom_domain = true, zone_name = "hconeai.com" },
	{ pattern = "api_staging.hconeai.com", custom_domain = true, zone_name = "hconeai.com" },
	{ pattern = "gateway_staging.hconeai.com", custom_domain = true, zone_name = "hconeai.com" },
	{ pattern = "2yfv_staging.hconeai.com", custom_domain = true, zone_name = "hconeai.com" },
	{ pattern = "2yfv_staging2.hconeai.com", custom_domain = true, zone_name = "hconeai.com" },
]

kv_namespaces = [
	{ binding = "RATE_LIMIT_KV", id = "0492dc9511cb4ed5b6f012a85354fa34", preview_id = "d275df550f7a4276ad50a3115f3e84b4" },
	{ binding = "CACHE_KV", id = "81f49b61645345a499b37e3944c3502d", preview_id = "9d7e936c78be456c8c7e296a15215837" },
	{ binding = "INSERT_KV", id = "364ccea321534b4397fd8934f5757bd6", preview_id = "03504e09b1c949e6a3b77b11bb45d602" },
	{ binding = "UTILITY_KV", id = "8b5d1650741d4f999e858f788387e3fa", preview_id = "a0ecbc9180784f7096e7ca1932b5676a" },
	{ binding = "REQUEST_AND_RESPONSE_QUEUE_KV", id = "cf75f1c978d14eaeabc4483662688ab4", preview_id = "cf75f1c978d14eaeabc4483662688ab4" },
	{ binding = "SECURE_CACHE", id = "23d7b3cb44254e0eb0b824a310abe155" },
]

durable_objects.bindings = [
	{ name = "RATE_LIMITER", class_name = "InMemoryRateLimiter" }
]

queues.producers = [
	{ binding = "FALLBACK_QUEUE", queue = "fallback-queue-staging" },
]

[env.production_staging.vars]
SUPABASE_URL = "https://bolqqmqbrciybnypvklh.supabase.co"
CLICKHOUSE_HOST = "https://p76qbrlulo.us-east-1.aws.clickhouse.cloud:8443"
VAULT_ENABLED = "true"

[env.production_staging.triggers]
crons = []


[[migrations]]
tag = "v1"
new_classes = ["AtomicRateLimiter"]

[[migrations]]
tag = "v2"
new_classes = ["AtomicAlerter"]

[[migrations]]
tag = "v3"
deleted_classes = ["AtomicAlerter"]

[[migrations]]
tag = "v4"
new_classes = ["AtomicAlerter"]

[[migrations]]
tag = "v5"
deleted_classes = ["AtomicAlerter"]

[[migrations]]
tag = "v6"
new_classes = ["InMemoryRateLimiter"]
deleted_classes = ["AtomicRateLimiter"]